<div class="x_panel">
  <div class="x_content" style="display: block;">
    <div class="nav navbar-right panel_toolbox">
      <a class="fa fa-plus" href="/mall/add.html">添加</a>
    </div>
    <br><br>
    <div class="row-fluid">
      <form action="/mall/index.html" method="get">
        <div class="col-md-3 col-sm-3 col-xs-3">
          <label class="control-label">合作商名称</label>
          <input type="text" class="form-control" name="form[partner_name]" value="{if isset($query.partner_name)}{$query.partner_name}{/if}">
        </div>
        <div class="col-md-3 col-sm-3 col-xs-3">
          <label class="control-label">商城ID</label>
          <input type="text" class="form-control" name="form[mall_id]" value="{if isset($query.mall_id)}{$query.mall_id}{/if}">
        </div>
        <button type="submit" class="btn btn-primary" style="margin-bottom: -58px;">搜索</button>
      </form>
    </div>
    <br><br>
    <!--表格主体内容-->
    <div class="cont">
      <table class="table table-bordered table-striped">
        <thead>
        <tr>
          <th width="100px">商城ID</th>
          <th>商城名称</th>
          <th>合作商名称</th>
          <th>商城LOGO</th>
          <th>订单数量</th>
          <th>商品数量</th>
          <th>创建时间</th>
          <th>修改时间</th>
          <th>访问链接</th>
          <th>状态</th>
          <th>操作</th>
        </tr>
        </thead>
        <tbody>
        {foreach $mall.lists as $mallitem}
        <tr>
          <td>{$mallitem.mall_id}</td>
          <td>{$mallitem.mall_name}</td>
          <td>{$mallitem.partner_name}</td>
          <td><img src="{$mallitem.mall_logo}" width="50px" height="50px" /> </td>
          <td>{$mallitem.order_num}</td>
          <td>{$mallitem.goods_num}</td>
          <td>{$mallitem.add_time}</td>
          <td>{$mallitem.update_time}</td>
          <td>{$mallitem.mall_link}</td>
          <td>{if $mallitem.mall_status==1}启用{else}停用{/if}</td>
          <td>
            <div class="x_content">
              <a class="btn btn-primary btn-xs" href="{eval U(['mall/edit','mall_id'=>$mallitem.mall_id])}"> 编辑</a>
              <button class="btn btn-danger btn-xs" data-toggle="dropdown">{if $mallitem.mall_status==1}停用{else}启用{/if}
                <i class="icon-angle-down"></i></button>
              <ul class="dropdown-menu">
                <li><a href="{eval U(['mall/save-status','mall_id'=>$mallitem.mall_id])}">确定</a></li>
                <li><a href="javascript:;">取消</a></li>
              </ul>
            </div>
          </td>
        </tr>
        {/foreach}
        </tbody>
      </table>
      <!--分页-->
      {Yii::$app->view->render('/com/pager.php',['pager'=>$mall.pager])}
    </div>
  </div>
</div>
